<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/11/24
  Time: 12:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%
    //设置无缓存
    response.setHeader("progma", "no-cache");
    response.setHeader("Cache-Control", "no-cache");
    String ctx = request.getContextPath();
    request.setAttribute("ctx", ctx);
%>
<!DOCTYPE html>
<html>
<head>
    <title>熊猫后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/themes/icon.css">
    <script src="${ctx}/script/jquery.min.js" type="text/javascript"></script>
    <script src="${ctx}/script/jquery-easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="${ctx}/script/jquery-easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <!--[if lt IE 7]>
    <script type="text/javascript" src="${ctx}/script/unitpngfix.js"></script>
    <![endif]-->
    <script type="text/javascript">
        $(function () {
            <%--var obj = {};--%>
            <%--obj.onClick = function (node) {--%>
                <%--var url = "${ctx}" + node.attributes.url;--%>
                <%--var title = node.text;--%>
                <%--addTab(url, title);--%>
            <%--}--%>
            <%--$("#menuul").tree(obj);--%>
            $("#menuul").find("a").click(function(){
                var that=$(this);
                var url=that.attr("url");
                var title=that.text();
                if(url){
                    addTab(url,title);
                }
            })
        })

        function addTab(url, title) {
//            if (!$('#tabs').tabs('exists', title)) {
                var html = '<iframe scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>';
                $('#tabs').tabs('add', {
                    title: title,
                    content: html,
                    closable: true
                });
                $('#tabs').tabs('getSelected').css("overflow", "hidden");
//            } else {
//                $('#tabs').tabs('select', title);
//            }
        }
    </script>
    <style type="text/css">
        .tree-title {
            line-height: 25px;
        }

        .tree-title a {
            color: black;
            line-height: 25px;
            text-decoration: none;
        }

        .tree-title a:hover {
            color: red;
            text-decoration: none;
        }
    </style>
</head>
<body class="easyui-layout">
<div data-options="region:'north',border:false"
     style="height:77px;background: url(${sta}/themes/default/images/a_top.gif) no-repeat left bottom #1d68b8; width:100%; margin-bottom:4px;">
    <div class="admins_top">
        <!--头部开始-->
        <div class="a_logo">
            <div class="logos_name">熊猫后台管理系统</div>
            <div class="logo_admin">你好，管理员！</div>
        </div>
        <div class="admin_nav">
            <ul>
                <li><a href="main"><img src="${sta}/themes/default/images/t4.png"/><span>返回首页</span></a>
                </li>
                <li><a href="javascript:void(0)"><img src="${sta}/themes/default/images/t3.png"/><span>个人设置</span></a>
                </li>
                <li><a href="${ctx}/web/main/logout"><img src="${sta}/themes/default/images/t1.png"/><span>退出</span></a>
                </li>
            </ul>
        </div>
        <!--头部结束-->
    </div>

</div>
<div data-options="region:'west',split:true,title:'菜单名称'" style="width:232px;">
    <div class="easyui-accordion" data-options="fit:true,border:false">
        <div title="" style="background:#e8edf3; " data-options="iconCls:'icon-ok',selected:true">
            <!--树形开始-->
            <ul id="menuul" class="easyui-tree" data-options="animate:true,lines:true"
                style=" padding:10px">
                <li>
                    <span>信息管理</span>
                    <ul>
                        <li><span><a href="javascript:void(0)" url="${ctx}/admin/zhihuhuati">段子</a></span></li>
                        <li><span><a href="javascript:void(0)" url="${ctx}/admin/qutu">趣图</a></span></li>
                    </ul>
                </li>
                <li>
                    <span>服务管理</span>
                    <ul>
                        <li><span><a href="javascript:void(0)" url="${ctx}/admin/server">服务管理</a></span></li>
                    </ul>
                </li>
            </ul>
            <!--树形结束-->
        </div>
    </div>
</div>
<div data-options="region:'south',border:false" style="background:#2870c4;padding:10px; text-align:center; color:#fff;">
    版权所有&copy;红有软件
</div>
<div data-options="region:'center'">
    <div id="tabs" class="easyui-tabs" closable="true" fit="true" border="true">
        <div title="我的桌面">
            <div class="cs-home-remark">
                <!--右侧内容开始-->
                <%--<div class="right_text">--%>
                    <%--<ul class="desk">--%>
                        <%--<li><a url="${ctx}/web/manauser" href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d1.gif"/><b>牧场主管理</b></a></li>--%>
                        <%--<li><a url="${ctx}/web/flocks" href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d2.gif"/><b>羊群管理</b></a></li>--%>
                        <%--<li><a url="${ctx}/web/sheepinfo" href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d3.gif"/><b>羊的信息管理</b></a></li>--%>
                        <%--<li><a url="${ctx}/web/growthrecord" href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d4.gif"/><b>羊成长记录</b></a></li>--%>
                        <%--<li><a href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d5.gif"/><b>推广版面管理</b></a></li>--%>
                        <%--<li><a href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d6.gif"/><b>宣传页面管理</b></a></li>--%>
                        <%--<li><a url="${ctx}/web/protocol" href="javascript:void(0)"><img--%>
                                <%--src="${sta}/themes/default/images/d7.gif"/><b>协议管理</b></a></li>--%>
                        <%--<li><a href="javascript:void(0)"><img src="${sta}/themes/default/images/d8.gif"/><b>众筹管理</b></a>--%>
                        <%--</li>--%>
                        <%--<li><a href="javascript:void(0)"><img src="${sta}/themes/default/images/d9.gif"/><b>订单查询</b></a>--%>
                        <%--</li>--%>
                    <%--</ul>--%>
                <%--</div>--%>
                <!--右侧内容结束-->
            </div>
        </div>
    </div>
</div>
</body>
</html>